package org.rcy.framework.api.cacheable;

import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;

public interface CacheTemplate<T> {

    T get(String key);
    T get(final String key, int seconds);
    boolean touch(final String key, int seconds);

    boolean add(String key, T data);

    boolean add(String key, T data, int seconds);

    boolean deferred(String key, int expireTime, TimeUnit unit);
    boolean set(String key, T data);

    boolean set(String key, T data, int seconds);

    boolean delete(String key);

    boolean replace(String key, T data);

    boolean replace(String key, T data, int seconds);

    Long ttl(final String key);

    Set<String> keys(String key);
}